<?php
/**
 * @package                Joomla.Site
 * @subpackage	Templates.beez_20
 * @copyright        Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license                GNU General Public License version 2 or later; see LICENSE.txt
 */

// No direct access.
defined('_JEXEC') or die;

jimport('joomla.filesystem.file');

// check modules
$showRightColumn	= ($this->countModules('position-3') or $this->countModules('position-6') or $this->countModules('position-8'));
$showbottom			= ($this->countModules('position-9') or $this->countModules('position-10') or $this->countModules('position-11'));
$showleft			= ($this->countModules('position-4') or $this->countModules('position-7') or $this->countModules('position-5'));
$showblock			= ($this->countModules('block1') or $this->countModules('block2') or $this->countModules('block3'));
$pageoption = JRequest::getVar('option');
$pageview = JRequest::getVar('view');
$Itemid = JRequest::getVar('Itemid');
//echo $Itemid ;die();
$isHome = ($pageoption == 'com_content' and $pageview == 'featured');
$isArticle = ($pageopion == 'com_content' and $pageview == 'article');
$layout=JRequest::getVar('layout');
$template = $this->template;
$user  = JFactory::getUser();
//var_dump($template);die;
//if($isHome) echo 'home';
if ($showRightColumn==0 and $showleft==0) {
	$showno = 0;
}

JHtml::_('behavior.framework', true);

// get params
$color				= $this->params->get('templatecolor');
$logo				= $this->params->get('logo');
$navposition		= $this->params->get('navposition');
$app				= JFactory::getApplication();
$doc				= JFactory::getDocument();
$templateparams		= $app->getTemplate(true)->params;
$templatepath       = $this->baseurl.'/templates/'.$this->template;
$document= & JFactory::getDocument();
$meta = $document->getMetaData('description');
if($meta!="")
$document->setTitle($meta);
?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
	<jdoc:include type="head" />
	<link href='http://fonts.googleapis.com/css?family=Lato:400,300,300italic,900,900italic,400italic,700,700italic' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" href="<?php echo $templatepath; ?>/src/css/camera.css">
	<link rel="stylesheet" href="<?php echo $templatepath; ?>/src/css/style.css">
	<link rel="stylesheet" href="<?php echo $templatepath; ?>/src/css/cuong.css">
	<link rel="stylesheet" href="<?php echo $templatepath; ?>/src/css/reveal.css"/>
	<!--[if lt IE 9]>
	  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->

	<!--[if gte IE 9]>
	  <style type="text/css">
		.gradient {
		   filter: none;
		}
	  </style>
	<![endif]-->
	<script src="<?php echo $templatepath; ?>/src/js/modernizr-2.6.2-respond-1.1.0.min.js"></script>
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
	<script>window.jQuery || document.write('<script src="<?php echo $templatepath; ?>/src/js/jquery-1.8.3.min.js"><\/script>')</script>
	<script type="text/javascript">
		jQuery(document).ready(function(jQuery) {
			close_popup=function(){		
					var fel=jQuery('#f_focus').html();
					jQuery('#backoverlay').hide();
					jQuery('#show_popup').hide();
					jQuery('#' + fel ).focus();		
			 };
		 });
	</script>
	<!--  
	<script type="text/javascript">
		jQuery(function() {
			if( jQuery('#system-message dd ul li').length > 0) {
						jQuery('#alert').html(jQuery('#system-message dd ul li').html());
						jQuery('#backoverlay').show();
						jQuery('#show_popup').show();
					}
			});	
	</script> -->
	<script>
		$(document).ready( function(){	
			var html = $('div#custom-page-heading > .heading').clone(true);
			$('div#top-banner1').append(html);
			$('div#custom-page-heading').remove();
		});
	</script>
	
	<script type="text/javascript">
 
  var _gaq = _gaq || [];
var pluginUrl =
'//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
  _gaq.push(['_setAccount', 'UA-39324842-1']);
  _gaq.push(['_setDomainName', 'logpoint.com']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_trackPageview']);
 
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
 
</script>
<!-- Tracking system by LeadTracker, www.leadtracker.dk -->
<script type="text/javascript" src="https://trk.leadtracker.dk/impl.js"></script>
<script type="text/javascript">
_ltTrack('E4C8EC76HR1z');
</script>
<!-- End LeadTracker script -->

	
	<style>	
		a {cursor:pointer;}
		.bg_alert{ width:275px; height:115px; background:url("<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/img/bg_alert.png") no-repeat top left; margin:0px auto; padding:10px 0px 0px 78px; color:#000;}
		.m35l{ margin-left:35px;}
	</style>
    </head>
    <body>
		<div id="dialog" style="display:none; position: fixed; top: 10%; left: 35%; z-index:10002;"></div>
		<div class="bg_alert" id="show_popup" style="font-size:13px; display:none; position: fixed; top: 35%; left: 50%; z-index:10003; margin-left:-140px;">
			<span id="f_focus" style="display:none;"></span>
			<div style="margin:0; padding-top:0px; min-height:75px;width:260px;" id="alert"></div>
			<div style="padding-left: 40px;"><a href="javascript:void(0);" onclick="close_popup();"><img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/img/bt_luk.png" alt="" /></a></div>
		</div>
		<div style="display: none;position: fixed; top: 0;left: 0;width: 100%;height: 100%;background-color: #000000;z-index:10002;-moz-opacity: 0.8;opacity:.80;filter: alpha(opacity=80);" id="backoverlay"></div>
		
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
        <![endif]-->
			<div id="w-f-login" class="f-popup reveal-modal">
				<div class="p-content clear-fix">
					<jdoc:include type="modules" name="login" />
					<!--  
					<form class="f-login" name="" method="get" action="">
						<fieldset>
							<a href="#" id="close-reveal-modal" class="close-reveal-modal"></a>
							<div class="f-login-top">
								<h2 class="ig-login">Partner login</h2>
								<p>Login to Partner Community
								Enter your username (e-mail) and password to login</p>
								<div>
									<label>Username</label>
									<input class="i-toggle" type="text" value="Enter your e-mail" />
								</div>
								<div>
									<label>Password</label>
									<input type="password" value="123456" class="i-toggle" />
								</div>
								<a id="bntlogin" href="index-company.php">Login</a>
								<div class="chbox">
									<input class="cb" type="checkbox" />
									<span>Keep me logged in</span>
								</div>
							</div>
							<div class="f-login-b">
								<a href="forgot-pass.php">Forgot your password?</a><br />
								<a href="partner-signup.php">Become a partner? Apply here </a>
							</div>
						</fieldset>
					</form>-->
				</div>
				<!--<a id="close-reveal-modal" class="close-reveal-modal"></a>-->
			</div>

       <div id="menu-fix">
			<div class="max-container" id="max-header">
				<header class="header clearfix">
					<h2 id="logo"><a href="./">Logpoint</a></h2>
					<section id="social-header" class="clearfix">
						<jdoc:include type="modules" name="socials" />
						<a href="http://customer.immunesecurity.com" target="_blank" id="client-login">Client login</a>
					</section>
					<section id="header-login" class="clearfix">
						<jdoc:include type="modules" name="user-menu" />
					</section>
					<div class="clear"></div>
				</header>
			</div>
			<div class="max-container" id="max-navigation">
				<nav class="navigation clearfix">
					<jdoc:include type="modules" name="navigate1" />
					<div id="nav-search">
						<jdoc:include type="modules" name="search" />
					</div>
				</nav>
			</div>
			<div class="max-container" id="max-submenu">
				<!-- <div class="wrapper">
					<nav class="nav-sub clearfix">
						<ul id="submenu-1" class="submenu">
							<li><a href="whitepaper.php">Whitepapers</a></li>
							<li><a href="manual.php">Manuals</a></li>
							<li><a href="edu-service.php">Educational services</a></li>
						</ul>
					</nav>
				</div> -->
			</div>
		</div>
        <div id="head-temp"></div>	
       	<?php if ($this->countModules('slide') and $template =='mwc'): ?>
        <div class="max-slider <?php echo !$isHome?'tpl-padding':''; ?>" id="<?php echo $isHome?'max-slider-homepage':'max-slider-2';?>">
			<div class="<?php echo $isHome?'camera_wrap':'wrapper clearfix';?>" id="<?php echo $isHome?'slider-home':'top-banner1';?>">
			
					<jdoc:include type="modules" name="slide" />
				
			</div>
            <div class="clear"></div>
        </div>
		<?php endif; ?>
		<?php if ($this->countModules('section-why')): ?>
        <div class="max-container tpl-padding max-lightbg" id="max-why">
            <div class="wrapper clearfix" id="homepage-tpl">
                <section id="section-why" class="clearfix">
				 	<div id="box-intro">
						<h1>Welcome <?php echo $user->company;?></h1>
					</div>
					<jdoc:include type="modules" name="section-why" />
                </section>
            </div>
        </div>
		<?php endif; ?>
		<?php if ($this->countModules('section-partner-left') or $this->countModules('section-partner-right')): ?>
        <div class="wrapper tpl-padding clearfix" id="section-partner" >
            <div class="col-2" id="partner-left">
				<jdoc:include type="modules" name="section-partner-left" />
                <div class="clr"></div>
            </div>
            <div class="col-2 col-last" id="partner-right">
				<jdoc:include type="modules" name="section-partner-right" />
            </div>
        </div>
		<?php endif; ?>
        <div class="max-container tpl-padding max-lightbg" id="max-educate">
                <div class="wrapper clear-fix" id="<?php echo ($pageview=='article')?'educate-tpl':''; ?>">
				<?php if ($this->countModules('section-educate-intro') or $this->countModules('section-educate-header') or $this->countModules('section-educate-video-left') or $this->countModules('section-educate-video-right') or $this->countModules('section-educate-repository') or $this->countModules('section-educate-services')): ?>
                <section id="section-educate" class="clearfix">
                    <div id="educate-intro">
						<jdoc:include type="modules" name="section-educate-intro" />
                    </div>
                    <div class="col-2" id="edu-left">
                        <div class="edu-header">
							<jdoc:include type="modules" name="section-educate-header" />
                        </div>
                        <div class="edu-video">
                            <div class="edu-vid-left">
								<jdoc:include type="modules" name="section-educate-video-left" />
                            </div>
                            <div class="edu-vid-right">
								<jdoc:include type="modules" name="section-educate-video-right" />
                            </div>
                        </div>
                    </div>
                    <div class="col-1" id="edu-mid">
						<jdoc:include type="modules" name="section-educate-repository" />
                    </div>
                    <div class="col-1 col-last" id="edu-right">
						<jdoc:include type="modules" name="section-educate-services" />
                    </div>
                </section>
				<?php endif; ?>
				<?php if($layout=="blog" || $pageoption=="com_search" ){?>
				   <div class="tpl-left col-3 left-content">
				<?php }else{?>
				  <div <?php if($pageview=="article") echo "class='text-wrapper clearfix'"; else echo "class='col-2'"?>>
				<?php }?>  
					<jdoc:include type="message" />
					<div class="breadcum clearfix">
						  <?php if($layout!='edit') :?>
						    <jdoc:include type="modules" name="breadcrumbs" />
						   <?php endif ;?>    
						
						<div class="clr"></div>
					</div>
					<jdoc:include type="component" />
                 </div>
                <?php if($layout=="blog" || $pageoption=="com_search"){?>
                 <div class="tpl-right col-1 col-last right-content">
                <?php }else{?>
                  <div class="col-2 col-last ">
                <?php }?> 
                   <!-- Tạo các module cột phải tương ứng cho từng trang tại đây -->
				   <?php if($layout!='edit') :?>
				     <jdoc:include type="modules" name="contact-form" />
				   <?php endif ;?>  
                </div>
            </div>
        </div>
		<?php if ($this->countModules('edu-video-left') or $this->countModules('edu-video-right')  or $this->countModules('headline-section')): ?>
		<div class="wrapper tpl-main tpl-padding clearfix" id="" >
			<?php if ($this->countModules('edu-video-left') or $this->countModules('edu-video-right')): ?>
		  <div class="col-2 border5 clearfix" id="edu-left2">
			<div class="vid-box vid-left">
			  <div class="edu-video">
				<div class="edu-vid-left2"> 
					<jdoc:include type="modules" name="edu-video-left" />
					
				</div>
			  </div>
			</div>
			<div class="vid-box vid-right">
			  <div class="edu-vid-right2"> 
				<jdoc:include type="modules" name="edu-video-right" />
				
			  </div>
			</div>
		  </div>
		  <?php endif; ?>
		  <?php if ($this->countModules('headline-section')): ?>
		  <div class="col-2 col-last">
			<jdoc:include type="modules" name="headline-section" />
			
		  </div>
		<?php endif; ?>
		</div>
		<?php endif; ?>
		<!-- end template for center content -->
		<?php if ($this->countModules('headline-module1') or $this->countModules('headline-module2')  or $this->countModules('headline-module3')): ?>
		<div class="max-container tpl-padding max-lightbg" id="">
			<div class="wrapper clearfix" id="">
				<?php if ($this->countModules('headline-module1')): ?>
				<div class="col-2">
					<jdoc:include type="modules" name="headline-module1" />
					
				</div>
				<?php endif; ?>
				<?php if ($this->countModules('headline-module2')): ?>
				<div class="col-1">
					<jdoc:include type="modules" name="headline-module2" />
					
				</div>
				<?php endif; ?>
				<?php if ($this->countModules('headline-module3')): ?>
				<div class="col-1 col-last">
					<jdoc:include type="modules" name="headline-module3" />
					
				</div>
				<?php endif; ?>
			</div>
		</div>
		<?php endif; ?>
		<?php if ($this->countModules('latest-blog') or $this->countModules('got-question')): ?>
        <div class="wrapper tpl-padding clearfix" id="section-question">
            <div class="col-2">
                <h2 class="heading-icon ig-message">Latest from the blog</h2>
                <div id="latest-blog" class="clearfix">
					<jdoc:include type="modules" name="latest-blog" />
                </div>
            </div>
            <div class="col-2 col-last">
				<jdoc:include type="modules" name="got-question" />
            </div>
        </div>
		<?php endif; ?>
		<?php if ($this->countModules('footer-top1') or $this->countModules('footer-top2')  or $this->countModules('footer-top3') or $this->countModules('footer-top-col1') or $this->countModules('footer-top-col2')  or $this->countModules('footer-top-col3') or $this->countModules('footer-top-col4')): ?>
		<div class="wrapper tpl-padding clearfix" id="footer-top">
			<div class="col-1 footer-top">
				<jdoc:include type="modules" name="footer-top1" />
				
			</div>
			<div class="col-2 footer-top" id="box-center">
				<jdoc:include type="modules" name="footer-top2" />
			
			</div>
			<div class="col-1 col-last footer-top">
				<jdoc:include type="modules" name="footer-top3" />
				
			</div>
			<div class="clear"></div>
			<div class="col-1">
				<div class="col-box gradient-1">
					<jdoc:include type="modules" name="footer-top-col1" />
					
				</div>
			</div>
			<div class="col-1">
				<div class="col-box gradient-1">
					<jdoc:include type="modules" name="footer-top-col2" />
					
				</div>
			</div>
			<div class="col-1">
				<div class="col-box gradient-1">
					<jdoc:include type="modules" name="footer-top-col3" />
					
				</div>
			</div>
			<div class="col-1 col-last">
				<div class="col-box gradient-1">
					<jdoc:include type="modules" name="footer-top-col4" />
					
				</div>
			</div>
		</div>
		<?php endif; ?>
        <div class="max-container tpl-padding" id="max-footer">
            <div class="wrapper clearfix" id="footer-section">
                <footer class="footer clearfix">
                    <div id="footer-left" class="clearfix">
						<jdoc:include type="modules" name="footer-menu" />
						<jdoc:include type="modules" name="footer" />
                    </div>
                    <div id="footer-right" class="clearfix">
						<jdoc:include type="modules" name="follow-us" />
                        <div class="clr"></div>
                    </div>
                </footer>
            </div>
        </div>
      

		<script type="text/javascript" src="<?php echo $templatepath; ?>/src/js/jquery.easing.js"></script>
		<script type="text/javascript" src="<?php echo $templatepath; ?>/src/js/jquery.reveal.js"></script>
		<script type='text/javascript' src='<?php echo $templatepath; ?>/src/js/jquery.mobile.customized.min.js'></script>
		<script type='text/javascript' src='<?php echo $templatepath; ?>/src/js/camera.min.js'></script>
		<script type="text/javascript" src="<?php echo $templatepath; ?>/src/js/jquery.inputToggle.js"></script>
		<script type="text/javascript" src="<?php echo $templatepath; ?>/src/js/jquery.validate.js"></script>
		<script type="text/javascript" src="<?php echo $templatepath; ?>/src/js/init.js"></script>
        <script>
            $(document).ready( function(){
                $('#slider-home').camera({
                    height      : '300px',
                    loader      : 'none',
                    fx          : 'simpleFade',
                    playPause   : false,
                    pagination  : true,
                    thumbnails  : false,
                    time        : 2000
                });
            });
        </script>
    </body>
</html>

